<table class="layui-table">
    <colgroup>
        <col width="150">
        <col >
        <col >
        <col >
        <col >

    </colgroup>
    <thead>
    <tr>
        <th>序号</th>
        <th>学生姓名</th>
        <th>学校</th>
        <th>年级</th>
        <th>班别</th>
    </tr>
    </thead>
    <tbody>

    <?php

    if (count($student) == 0) {
        echo "<tr><td colspan='6'>暂无数据</td></tr>";
    }

    ?>


    <?php
    for ($i = 0; $i < count($student); $i++) {


        ?>

        <tr id="item<?echo $student[$i]['nid']?>" >
            <td><? echo $i+1 ?></td>
            <td><? echo $student[$i]['name']?></td>
            <td><? echo $student[$i]['school']?></td>
            <td><? echo $student[$i]['grade'];?></td>
            <td><? echo $student[$i]['class_']?></td>

        </tr>
        <?php

    }
    ?>
    </tbody>
</table>
